package com.woniuxy.dudugua.mapper;

import com.woniuxy.dudugua.entity.Order;
import com.woniuxy.dudugua.entity.OrderExample;
import java.util.List;
import java.util.Map;

import com.woniuxy.dudugua.util.view.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.relational.core.sql.In;

public interface OrderMapper {
    long countByExample(OrderExample example);

    int deleteByExample(OrderExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Order record);

    int insertSelective(Order record);

    List<Order> selectByExample(OrderExample example);

    Order selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Order record, @Param("example") OrderExample example);

    int updateByExample(@Param("record") Order record, @Param("example") OrderExample example);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    /**
     * 根据userid查询所有订单和详细订单信息
     */
    List<Order> selectOderById(int userId);

    List<Order> selectOrderByReturnId(int returnId);

    List<MerchantsView> selectMerchantsOrder(Map<String,Integer> map);

    Integer selectCountById(Integer storeId);

    List<UserCouponsView> selectCouponsView(int userid);

    List<ProductAndCategoryView> selectProductCategoryViewBySkuID(int skuid);

    List<AdminOrderView> selectAllOrder(Map<String,Integer> map);

    //订单数量
    List<OrderNumberView>   selectByOrderNumber()   throws  Exception;

}